<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
</head>
<body>

<div id="app">
  姓：<input type="text" v-model="firstName"><br /><br />
  名：<input type="text" v-model="lastName"><br /><br />
  姓名：<span>{{firstName}}--{{lastName}}</span>
</div>

<!--引入vue文件-->
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<script>
    const vm = Vue.createApp({
      data() {
        return {
          firstName: '',
          lastName: '',
        }
      }
    }).mount('#app');
</script>

</body>
</html>
